package co.edu.militar.multimedia.admin;

import java.io.File;
import java.util.Arrays;
import java.util.List;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileNameExtensionFilter;

/**
 *
 * @author Alejandro
 */
public class FileManager {

    private static final String[] exts = {"jpg", "png", "gif", "bmp"};
    private static final FileNameExtensionFilter filter = new FileNameExtensionFilter("archivo de imagen", exts);

    public static List<File> cargarArchivos(JFileChooser image) {
        image.setFileFilter(filter);
        int OP = image.showOpenDialog(null);
        if (OP == JFileChooser.APPROVE_OPTION) {
            return Arrays.asList(image.getSelectedFiles());
        }else{
            return null;
        }
    }
}